package com.aaa.ssm.service;

import com.aaa.ssm.entity.SysUser;
import com.aaa.ssm.util.Page;
import com.aaa.ssm.util.Result;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ fileName:SysUserService
 * @ description:
 * @ author:张圣福
 * @ createTime:2023/10/8 20:25
 * @ version:1.0.0
 */
public interface SysUserService {
    SysUser checkUser(@Param("userName")String userName, @Param("password")String password);

    int add(SysUser sysUser);

    PageInfo queryByPage(Page<SysUser> page);

    List<SysUser> queryAll(SysUser sysUser);
    int update(SysUser sysUser);
    int deleteById(Integer userId);

    SysUser queryById(Integer userId);

    /*
     * 分配角色
     * */
    Result confirmAllocationRole(Integer userId, Integer[] checkedRole);

    /*
     * 删除用户当前的角色
     * */
    int deleteByUserId(Integer userId);
}
